package com.zretc.service.impl;

import com.zretc.dao.CustomerMapper;
import com.zretc.pojo.CustomerInfo;
import com.zretc.pojo.User;
import com.zretc.service.CustomerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class CustomerServiceImpl implements CustomerService {
    @Autowired
    private CustomerMapper customerMapper;
    /**
     * 根据用户角色id获取顾客信息
     *
     * @param
     * @return
     */
    @Override
    public List<CustomerInfo> getCustomerInfo() {
        return customerMapper.getCustomer();
    }

    /**
     * 根据用户姓名 和用户身份证号
     *
     * @param customerInfo
     * @return
     */
    @Override
    public List<CustomerInfo> getInfoByNameOrId(CustomerInfo customerInfo) {
        return customerMapper.getInfoByNameOrId(customerInfo);
    }

    /**
     * 根据用户身份证号查询用户信息
     *
     * @param idCard
     * @return
     */
    @Override
    public CustomerInfo findCustomerByIdCard(String idCard) {
        return customerMapper.findCustomerByIdCard(idCard);
    }
}
